import request from '@/router/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/mes-alert/strategy-message/warning-process-page',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    });
};

export const getWarningProcessCount = () => {
    return request({
        url: '/api/mes-alert/strategy-message/warning-process-count',
        method: 'get'
    });
};

export const getDetail = (id) => {
    return request({
        url: '/api/mes-alert/strategy-message/detail',
        method: 'get',
        params: {
            id
        }
    });
};

export const getAltStrategyType = () => {
    return request({
        url: '/api/blade-system/dict/dictionary?code=ALT_STRATEGY_TYPE',
        method: 'get',
    });
};

export const atrategyMessageSubmit = (data) => {
    return request({
        url: '/api/mes-alert/strategy-message/submit',
        method: 'post',
        data: data
    });
};

export const getModule = (metricType) => {
    return request({
        url: '/api/mes-alert/metric/module-key-value',
        method: 'get',
        params: {
            metricType
        }
    });
};